<template>
  <div>
    <!-- 帖子开始-->
    <el-card class="el-card" shadow="never"
             v-for="article in myArticles" :key="article.id"
             style="box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)">
      <!--标题-->
      <router-link :to="{path:'/index/article',query:{articleId:article.id}}"><h3>{{ article.title }}</h3>
      </router-link>
      <span style="line-height: 36px;color: #908d8d">{{ article.date }}</span>
      <!--正文-->
      <p>
        {{ article.content }}
      </p>
    </el-card>
    <!-- 帖子结束-->
    <br>
    <!-- 分页开始-->
    <el-pagination
      background
      layout="prev, pager, next"
      :total="1000">
    </el-pagination>
    <!-- 分页结束-->
  </div>
</template>

<script>
export default {
  name: 'UserArticles',
  props: ['myArticles']
}
</script>

<style scoped>

</style>
